<!doctype html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>我的任务</title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<include file="public/comm" />
	</head>

	<body>
		<header class="mui-bar mui-bar-nav fs_xl">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
			<h1 class="mui-title fs_xl">我的任务</h1>
		</header>
		<include file="public/bottom_nav" />
		<div class="mui-content fs_xl">
			<div class="task">
				<div class="task_tit"><span><em>我的任务</em></span></div>
				<div class="task_list">
					<ul>
						<li class="cls">
							<div class="task_lt">
								<span><img src="__STATIC__/images/task1.png" /></span>
							</div>
							<div class="task_rt">
								<p class="fs_l">完善资料(头像、收货地址)</p>
								<p class="fs_xs">新用户完善相关资料即可领取奖励。</p>
								<p class="fs_s red">奖励<span>10</span>银酒币</p>
								<if $task_res['t1'] == 0>
									<a class="task_btn" href="{:U('/Mobile/User/userinfo2')}">去完成</a>
								<elseif $task_res['t1'] == 1>
									<a class="task_btn" onclick="get_award(1)">领取</a>
								</elseif>
								<else>	
									<a class="task_btn active">已完成</a>
								</else>
								</if>
							</div>
						</li>
						<li class="cls">
							<div class="task_lt">
								<span><img src="__STATIC__/images/task2.png" /></span>
							</div>
							<div class="task_rt">
								<p class="fs_l">第一次签到</p>
								<p class="fs_xs">新用户完成一次签到即可领取奖励。</p>
								<p class="fs_s red">奖励<span>10</span>银酒币</p>
								<if $task_res['t2'] == 0>
									<a class="task_btn" href="{:U('/Mobile/User/userSign')}">去完成</a>
								<elseif $task_res['t2'] == 1>
									<a class="task_btn" onclick="get_award(2)">领取</a>
								</elseif>
								<else>	
									<a class="task_btn active">已完成</a>
								</else>
								</if>
							</div>
						</li>
						<!--<li class="cls">
							<div class="task_lt">
								<span><img src="__STATIC__/images/task3.png" /></span>
							</div>
							<div class="task_rt">
								<p class="fs_l">推广赚不停</p>
								<p class="fs_xs">每天推广拉取10个好友即可领取奖励。（{$my_users_num}/10）</p>
								<p class="fs_s red">奖励<span>100</span>银酒币</p>
								<if $task_res['t3'] == 0>
									<a class="task_btn" href="{:U('/Mobile/User/distribut_qr')}">去完成</a>
								<elseif $task_res['t3'] == 1>
									<a class="task_btn" onclick="get_award(3)">领取</a>
								</elseif>
								<else>	
									<a class="task_btn active" onclick="get_award(3)">已完成</a>
								</else>
								</if>
							</div>
						</li>-->
						<li class="cls">
							<div class="task_lt">
								<span><img src="__STATIC__/images/task4.png" /></span>
							</div>
							<div class="task_rt">
								<p class="fs_l">第一次购物</p>
								<p class="fs_xs">新用户完成第一次购物即可领取奖励。</p>
								<p class="fs_s red">奖励<span>50</span>银酒币</p>
								<if $task_res['t4'] == 0>
									<a class="task_btn" href="{:U('/Mobile/Goods')}">去完成</a>
								<elseif $task_res['t4'] == 1>
									<a class="task_btn" onclick="get_award(4)">领取</a>
								</elseif>
								<else>	
									<a class="task_btn active">已完成</a>
								</else>
								</if>
							</div>
						</li>
						<li class="cls">
							<div class="task_lt">
								<span><img src="__STATIC__/images/task4.png" /></span>
							</div>
							<div class="task_rt">
								<p class="fs_l">消费奖励一</p>
								<p class="fs_xs">每日单笔消费大于300元小于500元，领取奖励。</p>
								<p class="fs_s red">奖励<span>300</span>银酒币</p>
								<if $task_res['t5'] == 0>
									<a class="task_btn" href="{:U('/Mobile')}">去完成</a>
								<elseif $task_res['t5'] == 1>
									<a class="task_btn" onclick="get_award(5)">领取</a>
								</elseif>
								<else>	
									<a class="task_btn active">已完成</a>
								</else>
								</if>
							</div>
						</li>
						<li class="cls">
							<div class="task_lt">
								<span><img src="__STATIC__/images/task4.png" /></span>
							</div>
							<div class="task_rt">
								<p class="fs_l">消费奖励二</p>
								<p class="fs_xs">每日单笔消费大于500元小于1000元，领取奖励。</p>
								<p class="fs_s red">奖励<span>500</span>银酒币</p>
								<if $task_res['t6'] == 0>
									<a class="task_btn" href="{:U('/Mobile')}">去完成</a>
								<elseif $task_res['t6'] == 1>
									<a class="task_btn" onclick="get_award(6)">领取</a>
								</elseif>
								<else>	
									<a class="task_btn active">已完成</a>
								</else>
								</if>
							</div>
						</li>
						<li class="cls">
							<div class="task_lt">
								<span><img src="__STATIC__/images/task4.png" /></span>
							</div>
							<div class="task_rt">
								<p class="fs_l">消费奖励三</p>
								<p class="fs_xs">每日单笔消费达到1000元及以上，领取奖励。</p>
								<p class="fs_s red">奖励<span>1000</span>银酒币</p>
								<if $task_res['t7'] == 0>
									<a class="task_btn" href="{:U('/Mobile')}">去完成</a>
								<elseif $task_res['t7'] == 1>
									<a class="task_btn" onclick="get_award(7)">领取</a>
								</elseif>
								<else>	
									<a class="task_btn active">已完成</a>
								</else>
								</if>
							</div>
						</li>
						<!--<li class="cls">
							<div class="task_lt">
								<span><img src="__STATIC__/images/task5.png" /></span>
							</div>
							<div class="task_rt">
								<p class="fs_l">夺宝任务一</p>
								<p class="fs_xs">累计参加10期平台的一元夺宝活动 领取奖励。({$db_count}/10)</p>
								<p class="fs_s red">奖励<span>100</span>银酒币</p>
								<if $task_res['t8'] == 0>
									<a class="task_btn" href="{:U('/Mobile/Goods/indianaList')}">去完成</a>
								<elseif $task_res['t8'] == 1>
									<a class="task_btn" onclick="get_award(8)">领取</a>
								</elseif>
								<else>	
									<a class="task_btn active">已完成</a>
								</else>
								</if>
							</div>
						</li>
						<li class="cls">
							<div class="task_lt">
								<span><img src="__STATIC__/images/task5.png" /></span>
							</div>
							<div class="task_rt">
								<p class="fs_l">夺宝任务二</p>
								<p class="fs_xs">累计参加30期平台的一元夺宝活动 领取奖励。({$db_count}/30)</p>
								<p class="fs_s red">奖励<span>500</span>银酒币</p>
								<if $task_res['t9'] == 0>
									<a class="task_btn" href="{:U('/Mobile/Goods/indianaList')}">去完成</a>
								<elseif $task_res['t9'] == 1>
									<a class="task_btn" onclick="get_award(9)">领取</a>
								</elseif>
								<else>	
									<a class="task_btn active">已完成</a>
								</else>
								</if>
							</div>
						</li>-->
					</ul>
				</div>
			</div>
		</div>
	</body>
<script type="text/javascript">
	$(".task_lt").each(function(){
		$(this).height($(this).parent().height());
	})
	$(".task_lt").height($(".task_rt").height());
	//领取奖励
	function get_award(id){
		$.post("{:U('/Mobile/User/day_task')}",{'n':id},function(data){
			layer.alert(data.msg);
			if(data.status == 1){
				location.reload(true);
			}
		},'json');
	}	
</script>
</html>